<template>
  <div v-for="item in $store.state.Name" class="FaBox" @click="changeFile(item)">
    <span class="box">
       <img src="../assets/文件夹.png">
       <div class="name">{{ item }}</div>
    </span>
  </div>
</template>

<script setup>
import { clickItem } from '../api/inquire'
import { useStore } from 'vuex'

const store = useStore()

const changeFile = async(item) =>{
  console.log('111')
  const res = await clickItem(item)
  console.log(res.data)
  store.commit('sendName',res.data) 
}
</script>

<style scoped>
.FaBox {
  margin: 20px;
  width: 150px;
  /* background-color: pink; */
  display: inline-block;
}
.FaBox .name {
  width: 110px;
  margin: 0 auto;
  cursor: pointer;
}

</style>
